import * as vscode from 'vscode';

export default class Setting {
    private static _setting: vscode.WorkspaceConfiguration;

    public static init() {
        this._setting = vscode.workspace.getConfiguration();
    }

    public static get lineChar(): number {
        return this._setting.get("fish.setLineChar") || 50;
    }

    public static set lineChar(n: number) {
        this._setting.update("fish.setLineChar", n, true);
    }

    public static get pageLine(): number {
        return this._setting.get("fish.setPageLine") || 5;
    }

    public static set pageLine(n: number) {
        this._setting.update("fish.setPageLine", n, true);
    }

    public static get readModel(): number {
        return this._setting.get("fish.setReadModel") || 1;
    }

    public static set readModel(n: number) {
        this._setting.update("fish.setReadModel", n, true);
    }
}